Optimal. Leaf size=113 \[ -\frac{a \left (a^2+3 b^2\right ) \cot (c+d x)}{d}+\frac{b \left (3 a^2+b^2\right ) \log (\tan (c+d x))}{d}-\frac{3 a^2 b \cot ^2(c+d x)}{2 d}-\frac{a^3 \cot ^3(c+d x)}{3 d}+\frac{3 a b^2 \tan (c+d x)}{d}+\frac{b^3 \tan ^2(c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0860254, antiderivative size = 113, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3516, 894} \[ -\frac{a \left (a^2+3 b^2\right ) \cot (c+d x)}{d}+\frac{b \left (3 a^2+b^2\right ) \log (\tan (c+d x))}{d}-\frac{3 a^2 b \cot ^2(c+d x)}{2 d}-\frac{a^3 \cot ^3(c+d x)}{3 d}+\frac{3 a b^2 \tan (c+d x)}{d}+\frac{b^3 \tan ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3516
Rule 894
Rubi steps
\begin{align*} \int \csc ^4(c+d x) (a+b \tan (c+d x))^3 \, dx &=\frac{b \operatorname{Subst}\left (\int \frac{(a+x)^3 \left (b^2+x^2\right )}{x^4} \, dx,x,b \tan (c+d x)\right )}{d}\\ &=\frac{b \operatorname{Subst}\left (\int \left (3 a+\frac{a^3 b^2}{x^4}+\frac{3 a^2 b^2}{x^3}+\frac{a^3+3 a b^2}{x^2}+\frac{3 a^2+b^2}{x}+x\right ) \, dx,x,b \tan (c+d x)\right )}{d}\\ &=-\frac{a \left (a^2+3 b^2\right ) \cot (c+d x)}{d}-\frac{3 a^2 b \cot ^2(c+d x)}{2 d}-\frac{a^3 \cot ^3(c+d x)}{3 d}+\frac{b \left (3 a^2+b^2\right ) \log (\tan (c+d x))}{d}+\frac{3 a b^2 \tan (c+d x)}{d}+\frac{b^3 \tan ^2(c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 2.20723, size = 212, normalized size = 1.88 \[ \frac{\sec ^2(c+d x) (a \cot (c+d x)+b)^3 \left (-2 \sin (c+d x) \left (6 \left (3 a^2 b+b^3\right ) \cos (2 (c+d x))-3 b \left (3 a^2+b^2\right ) \cos (4 (c+d x)) (\log (\cos (c+d x))-\log (\sin (c+d x)))-9 a^2 b \log (\sin (c+d x))+9 a^2 b \log (\cos (c+d x))+18 a^2 b+2 a^3 \sin (4 (c+d x))+18 a b^2 \sin (4 (c+d x))-3 b^3 \log (\sin (c+d x))+3 b^3 \log (\cos (c+d x))-6 b^3\right )-16 a^3 \cos (c+d x)\right )}{48 d (a \cos (c+d x)+b \sin (c+d x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.068, size = 141, normalized size = 1.3 \begin{align*}{\frac{{b}^{3}}{2\,d \left ( \cos \left ( dx+c \right ) \right ) ^{2}}}+{\frac{{b}^{3}\ln \left ( \tan \left ( dx+c \right ) \right ) }{d}}+3\,{\frac{a{b}^{2}}{d\sin \left ( dx+c \right ) \cos \left ( dx+c \right ) }}-6\,{\frac{a{b}^{2}\cot \left ( dx+c \right ) }{d}}-{\frac{3\,b{a}^{2}}{2\,d \left ( \sin \left ( dx+c \right ) \right ) ^{2}}}+3\,{\frac{b{a}^{2}\ln \left ( \tan \left ( dx+c \right ) \right ) }{d}}-{\frac{2\,{a}^{3}\cot \left ( dx+c \right ) }{3\,d}}-{\frac{{a}^{3}\cot \left ( dx+c \right ) \left ( \csc \left ( dx+c \right ) \right ) ^{2}}{3\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.0644, size = 132, normalized size = 1.17 \begin{align*} \frac{3 \, b^{3} \tan \left (d x + c\right )^{2} + 18 \, a b^{2} \tan \left (d x + c\right ) + 6 \,{\left (3 \, a^{2} b + b^{3}\right )} \log \left (\tan \left (d x + c\right )\right ) - \frac{9 \, a^{2} b \tan \left (d x + c\right ) + 2 \, a^{3} + 6 \,{\left (a^{3} + 3 \, a b^{2}\right )} \tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{3}}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.01836, size = 575, normalized size = 5.09 \begin{align*} -\frac{4 \,{\left (a^{3} + 9 \, a b^{2}\right )} \cos \left (d x + c\right )^{5} + 18 \, a b^{2} \cos \left (d x + c\right ) - 6 \,{\left (a^{3} + 9 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} + 3 \,{\left ({\left (3 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{4} -{\left (3 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\cos \left (d x + c\right )^{2}\right ) \sin \left (d x + c\right ) - 3 \,{\left ({\left (3 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{4} -{\left (3 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac{1}{4} \, \cos \left (d x + c\right )^{2} + \frac{1}{4}\right ) \sin \left (d x + c\right ) + 3 \,{\left (b^{3} -{\left (3 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{6 \,{\left (d \cos \left (d x + c\right )^{4} - d \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 2.04811, size = 180, normalized size = 1.59 \begin{align*} \frac{3 \, b^{3} \tan \left (d x + c\right )^{2} + 18 \, a b^{2} \tan \left (d x + c\right ) + 6 \,{\left (3 \, a^{2} b + b^{3}\right )} \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) - \frac{33 \, a^{2} b \tan \left (d x + c\right )^{3} + 11 \, b^{3} \tan \left (d x + c\right )^{3} + 6 \, a^{3} \tan \left (d x + c\right )^{2} + 18 \, a b^{2} \tan \left (d x + c\right )^{2} + 9 \, a^{2} b \tan \left (d x + c\right ) + 2 \, a^{3}}{\tan \left (d x + c\right )^{3}}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]